﻿

namespace Huirui.Cavan.Application.MainBoundedContext.SystemModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Huirui.Cavan.Domain.MainBoundedContext.SystemModule;
    using Huirui.Cavan.Domain.MainBoundedContext.SearchModule;

    public class RoleAppService : BaseAppService<Role, RoleSearch, IRoleRepository>, IRoleAppService
    {
        public Role GetRoleByName(string name)
        {
            RoleSpecification roleSpecification = new RoleSpecification();
            roleSpecification.SearchParams = new RoleSearch();
            roleSpecification.SearchParams.Name = name;
            Role role = this.Repository.Get(roleSpecification);

            return role;
        }
    }
}
